﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Font.xaml"/>
        <ResourceDictionary Source="Color.xaml"/>
        <ResourceDictionary>

			<Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
				<Setter Property="Cursor" Value="Hand" />
				<Setter Property="Control.Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ListBoxItem}">
							<Border Name="Border" SnapsToDevicePixels="True" Margin="2" BorderBrush="#CCC" BorderThickness="1">
								<Border.Background>
									<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
										<GradientStop Color="#FFF" Offset="0" />
										<GradientStop Color="#EEE" Offset="1" />
									</LinearGradientBrush>
								</Border.Background>
								<ContentPresenter SnapsToDevicePixels="True" />
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter TargetName="Border" Property="Background" Value="#FFF" />
								</Trigger>
								<Trigger Property="IsSelected" Value="True">
									<Setter TargetName="Border" Property="BorderBrush" Value="#888" />
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<SolidColorBrush x:Key="ListBoxBorderBrush" Color="#828790" />
			<Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
				<Setter Property="Background" Value="Transparent" />
				<Setter Property="BorderThickness" Value="0" />
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
				<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
				<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
				<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
				<Setter Property="Control.VerticalContentAlignment" Value="Center" />
				<Setter Property="Control.Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ListBox}">
							<Border Name="Bd" Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" SnapsToDevicePixels="True" Padding="1">
								<ScrollViewer Padding="{TemplateBinding Control.Padding}" Focusable="False">
									<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
								</ScrollViewer>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="UIElement.IsEnabled" Value="False">
									<Setter TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Property="Border.Background" />
								</Trigger>
								<Trigger Property="ItemsControl.IsGrouping" Value="True">
									<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			
		</ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>